Optimal. Leaf size=177 \[ \frac {2 a^{3/2} c^3 \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}-\frac {2 a^2 c^3 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}+\frac {2 a^3 c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^4 c^3 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}-\frac {2 a^5 c^3 \tan ^7(e+f x)}{7 f (a+a \sec (e+f x))^{7/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 177, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {3989, 3972,
470, 308, 209} \begin {gather*} \frac {2 a^{3/2} c^3 \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{f}-\frac {2 a^5 c^3 \tan ^7(e+f x)}{7 f (a \sec (e+f x)+a)^{7/2}}-\frac {2 a^4 c^3 \tan ^5(e+f x)}{5 f (a \sec (e+f x)+a)^{5/2}}+\frac {2 a^3 c^3 \tan ^3(e+f x)}{3 f (a \sec (e+f x)+a)^{3/2}}-\frac {2 a^2 c^3 \tan (e+f x)}{f \sqrt {a \sec (e+f x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 308
Rule 470
Rule 3972
Rule 3989
Rubi steps
\begin {align*} \int (a+a \sec (e+f x))^{3/2} (c-c \sec (e+f x))^3 \, dx &=-\left (\left (a^3 c^3\right ) \int \frac {\tan ^6(e+f x)}{(a+a \sec (e+f x))^{3/2}} \, dx\right )\\ &=\frac {\left (2 a^5 c^3\right ) \text {Subst}\left (\int \frac {x^6 \left (2+a x^2\right )}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=-\frac {2 a^5 c^3 \tan ^7(e+f x)}{7 f (a+a \sec (e+f x))^{7/2}}+\frac {\left (2 a^5 c^3\right ) \text {Subst}\left (\int \frac {x^6}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=-\frac {2 a^5 c^3 \tan ^7(e+f x)}{7 f (a+a \sec (e+f x))^{7/2}}+\frac {\left (2 a^5 c^3\right ) \text {Subst}\left (\int \left (\frac {1}{a^3}-\frac {x^2}{a^2}+\frac {x^4}{a}-\frac {1}{a^3 \left (1+a x^2\right )}\right ) \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=-\frac {2 a^2 c^3 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}+\frac {2 a^3 c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^4 c^3 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}-\frac {2 a^5 c^3 \tan ^7(e+f x)}{7 f (a+a \sec (e+f x))^{7/2}}-\frac {\left (2 a^2 c^3\right ) \text {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=\frac {2 a^{3/2} c^3 \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}-\frac {2 a^2 c^3 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}+\frac {2 a^3 c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^4 c^3 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}-\frac {2 a^5 c^3 \tan ^7(e+f x)}{7 f (a+a \sec (e+f x))^{7/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.02, size = 122, normalized size = 0.69 \begin {gather*} \frac {a c^3 \left (210 \text {ArcTan}\left (\sqrt {-1+\sec (e+f x)}\right ) \cos ^3(e+f x)+(2-171 \cos (e+f x)+32 \cos (2 (e+f x))-73 \cos (3 (e+f x))) \sqrt {-1+\sec (e+f x)}\right ) \sec ^3(e+f x) \sqrt {a (1+\sec (e+f x))} \tan \left (\frac {1}{2} (e+f x)\right )}{105 f \sqrt {-1+\sec (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(391\) vs.
\(2(157)=314\).
time = 0.23, size = 392, normalized size = 2.21
method | result | size |
default | \(\frac {c^{3} \sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}\, \left (105 \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {7}{2}} \left (\cos ^{3}\left (f x +e \right )\right ) \sin \left (f x +e \right ) \sqrt {2}+315 \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {7}{2}} \left (\cos ^{2}\left (f x +e \right )\right ) \sin \left (f x +e \right ) \sqrt {2}+315 \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {7}{2}} \cos \left (f x +e \right ) \sin \left (f x +e \right ) \sqrt {2}+105 \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {7}{2}} \sin \left (f x +e \right )+2336 \left (\cos ^{4}\left (f x +e \right )\right )-2848 \left (\cos ^{3}\left (f x +e \right )\right )+128 \left (\cos ^{2}\left (f x +e \right )\right )+624 \cos \left (f x +e \right )-240\right ) a}{840 f \cos \left (f x +e \right )^{3} \sin \left (f x +e \right )}\) | \(392\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.88, size = 416, normalized size = 2.35 \begin {gather*} \left [\frac {105 \, {\left (a c^{3} \cos \left (f x + e\right )^{4} + a c^{3} \cos \left (f x + e\right )^{3}\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right ) - 2 \, {\left (146 \, a c^{3} \cos \left (f x + e\right )^{3} - 32 \, a c^{3} \cos \left (f x + e\right )^{2} - 24 \, a c^{3} \cos \left (f x + e\right ) + 15 \, a c^{3}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{105 \, {\left (f \cos \left (f x + e\right )^{4} + f \cos \left (f x + e\right )^{3}\right )}}, -\frac {2 \, {\left (105 \, {\left (a c^{3} \cos \left (f x + e\right )^{4} + a c^{3} \cos \left (f x + e\right )^{3}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) + {\left (146 \, a c^{3} \cos \left (f x + e\right )^{3} - 32 \, a c^{3} \cos \left (f x + e\right )^{2} - 24 \, a c^{3} \cos \left (f x + e\right ) + 15 \, a c^{3}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )\right )}}{105 \, {\left (f \cos \left (f x + e\right )^{4} + f \cos \left (f x + e\right )^{3}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - c^{3} \left (\int \left (- a \sqrt {a \sec {\left (e + f x \right )} + a}\right )\, dx + \int 2 a \sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )}\, dx + \int \left (- 2 a \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{3}{\left (e + f x \right )}\right )\, dx + \int a \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{4}{\left (e + f x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.61, size = 297, normalized size = 1.68 \begin {gather*} -\frac {\frac {105 \, \sqrt {-a} a^{2} c^{3} \log \left (\frac {{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} - 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}{{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} + 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}\right ) \mathrm {sgn}\left (\cos \left (f x + e\right )\right )}{{\left | a \right |}} - \frac {2 \, {\left (105 \, \sqrt {2} a^{5} c^{3} \mathrm {sgn}\left (\cos \left (f x + e\right )\right ) - {\left (385 \, \sqrt {2} a^{5} c^{3} \mathrm {sgn}\left (\cos \left (f x + e\right )\right ) + {\left (139 \, \sqrt {2} a^{5} c^{3} \mathrm {sgn}\left (\cos \left (f x + e\right )\right ) \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 539 \, \sqrt {2} a^{5} c^{3} \mathrm {sgn}\left (\cos \left (f x + e\right )\right )\right )} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}\right )} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}\right )} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - a\right )}^{3} \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}}}{105 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{3/2}\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^3 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________